---
--类名: DungeonInfo.lua
--创建日期: 2017-11-27
--创建人: 陈小虎
--功能描述: 
--修改内容:
--修改日期:   
--修改人:      
--修改备注: 
--
local DungeonInfo = class("DungeonInfo")

function DungeonInfo:ctor()
	self:clear()
end

function DungeonInfo:clear()
	self.dungeonUUID = 0
	self.dungeonID = 0
	self.dungeonSubID = 0
	self.isCrossDungeon = false
	self.createClock = nil
	self.finishClock = nil
	self.type = nil
	self.status = nil
	self.battleStatusInfos = {}
end

function DungeonInfo:read(params)
	-- print("******** DungeonInfo:read **********")
	-- dump(params)
	self.dungeonUUID = params.dungeonUUID
	-- self.dungeonID = params.dungeonID
	self.dungeonSubID = params.dungeonSubID
	self.isCrossDungeon = params.isCrossDungeon
	self.createClock = params.createClock
	self.finishClock = params.finishClock
	self.type = params.type
	self.status = params.status
	if params.battleStatusInfos then
		for i,v in ipairs(params.battleStatusInfos) do
			local battleStatusInfo = self.battleStatusInfos[v.index]
			if not battleStatusInfo then
				battleStatusInfo = {}
				self.battleStatusInfos[v.index] = battleStatusInfo
			end
			battleStatusInfo.index = v.index
			battleStatusInfo.id = v.id
			battleStatusInfo.finished = v.finished
		end
	end
	-- print("******** DungeonInfo:read ********** self.dungeonUUID = ",self.dungeonUUID)
	-- print("******** DungeonInfo:read ********** self.dungeonID = ",self.dungeonID)
	-- print("******** DungeonInfo:read ********** self.dungeonSubID = ",self.dungeonSubID)
	-- print("******** DungeonInfo:read ********** self.createClock = ",self.createClock)
	-- print("******** DungeonInfo:read ********** self.finishClock = ",self.finishClock)
	-- print("******** DungeonInfo:read ********** self.type = ",self.type)
	-- print("******** DungeonInfo:read ********** self.status = ",self.status)
	-- dump(self.battleStatusInfos)
end

return DungeonInfo